/**
 * Created by Administrator on 2015/11/7 0007.
 */

exports.setCookie = function (res, username) {
    res.cookie('username', username, {maxAge: 2 * 60 * 60 * 1000, signed: true});
}

exports.setCookieByName = function (res, name, value) {
    res.cookie(name, value, {maxAge: 2 * 60 * 60 * 1000, signed: true});
}

exports.clearCookise = function (res) {
    res.clearCookie('username', null)
}